package com.acme;

public class Task3Arrays {
	
	public static void printDivideByN (int n) {
		for (int i = 1; i <= 50; i++)
			if (i >= n && i%n == 0)
				System.out.print(i + " ");
		System.out.println("");
	}
	
	public static int [] createArray (int n) {
		int[] mass = new int[n];
		for (int i = 0; i < n; i++)
			mass[i] = i + 1;
		return mass;
	}
	
	public static double aver (int[] mass) {
		int sum = 0;
		for (int i : mass)
			sum += i;
		return (double) sum/2;
	}

	public static void main(String[] args) {
		printDivideByN (1);
		printDivideByN (3);
		printDivideByN (6);
		
		int[] testArray = createArray (10);
		System.out.println(aver(testArray));
				
	}

}
